package java_zuoye_2;

import java.util.ArrayList;
import java.util.Random;

public class homework_7 {
	public static void main(String[] arg) {
		createNumbers();
	}

	private static void createNumbers() {
		ArrayList<Integer> numbers = new ArrayList<>();
		ArrayList<Integer> newnumbers = new ArrayList<>();
		int temp;
		Random r = new Random();
		for(int i = 0; i < 20; i++) {
			temp = r.nextInt(100);
			numbers.add(temp);
			if(temp % 2 == 0) {
				newnumbers.add(temp);
			}
		}
		System.out.print(newnumbers);
	}
}
